package com.bykj.property.api.controller;

import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import com.alibaba.fastjson.JSON;
import com.bykj.property.controller.vo.export.SysBannerExport;
import com.bykj.property.controller.vo.request.SysBannerPageRequest;
import com.bykj.property.controller.vo.response.RespResult;
import com.bykj.property.model.SysBanner;
import com.bykj.property.service.SysBannerService;
import com.bykj.property.util.ExcelUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotEmpty;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * banner表 前端控制器
 * </p>
 *
 * @author liangyiming
 * @since 2019-06-19
 */

@RestController
@RequestMapping("/api")
public class CarouselController {
    @Autowired
    SysBannerService targetService;


    @ApiOperation(value = "查询banner列表接口")
    @RequestMapping(value = "/carousel", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    public RespResult query() {
            return RespResult.ok(targetService.list());
    }
}
